﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Himp.Outpatient.Migrations
{
    /// <inheritdoc />
    public partial class modify_table_OtpPayRec_1 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "PayOpterCodg",
                schema: "Outpatient",
                table: "OtpPayRec");

            migrationBuilder.DropColumn(
                name: "PayOpterName",
                schema: "Outpatient",
                table: "OtpPayRec");

            migrationBuilder.DropColumn(
                name: "RefdOpterCodg",
                schema: "Outpatient",
                table: "OtpPayRec");

            migrationBuilder.DropColumn(
                name: "RefdOpterName",
                schema: "Outpatient",
                table: "OtpPayRec");

            migrationBuilder.AlterColumn<DateTime>(
                name: "PayTime",
                schema: "Outpatient",
                table: "OtpPayRec",
                type: "timestamp without time zone",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "timestamp without time zone");

            migrationBuilder.AddColumn<Guid>(
                name: "RefdOpterId",
                schema: "Outpatient",
                table: "OtpPayRec",
                type: "uuid",
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "RefdOpterId",
                schema: "Outpatient",
                table: "OtpPayRec");

            migrationBuilder.AlterColumn<DateTime>(
                name: "PayTime",
                schema: "Outpatient",
                table: "OtpPayRec",
                type: "timestamp without time zone",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
                oldClrType: typeof(DateTime),
                oldType: "timestamp without time zone",
                oldNullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PayOpterCodg",
                schema: "Outpatient",
                table: "OtpPayRec",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "PayOpterName",
                schema: "Outpatient",
                table: "OtpPayRec",
                type: "text",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "RefdOpterCodg",
                schema: "Outpatient",
                table: "OtpPayRec",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "RefdOpterName",
                schema: "Outpatient",
                table: "OtpPayRec",
                type: "text",
                nullable: true);
        }
    }
}
